#!/bin/bash
ZOMBIES=$(ps aux | grep 'defunct' | grep -v grep | wc -l)
[ $ZOMBIES -gt 0 ] && kill -HUP $(ps -A -ostat,ppid | awk '/[Zz]/{print $2}')